import {createRouter, createWebHashHistory} from "vue-router";
import ForgetPassword from "@/views/userCenter/ForgetPassword.vue";
import PersonalCenter from "@/views/userCenter/PersonalCenter.vue";
import PersonalPage from "@/views/userPage/PersonalPage.vue";
import PersonalSetting from "@/views/userCenter/PersonalSetting.vue";
import MyMessage from "@/views/userCenter/MyMessage.vue";
import PersonalWorks from "@/views/userCenter/PersonalWorks.vue";
import ChangePassword from "@/views/userCenter/ChangePassword.vue";
import MyLikes from "@/views/userCenter/MyLikes.vue";
import Demands from "@/views/demands/Demands.vue";
import NewWork from "@/views/works/NewWork.vue";
import HotWork from "@/views/works/HotWork.vue";
import DemandsRelease from "@/views/demands/DemandsRelease.vue";
import MyDemands from "@/views/userCenter/MyDemands.vue";
import DemandDetails from "@/views/demands/DemandDetails.vue";
import DemandUserPage from "@/views/userPage/DemandUserPage.vue";
import Authors from "@/views/author/Authors.vue";
import SearchPage from "@/views/search/SearchPage.vue";
import ConfirmOrder from "@/views/orders/ConfirmOrder.vue";
import MyOrders from "@/views/userCenter/MyOrders.vue";
import CommentOrder from "@/views/orders/CommentOrder.vue";
import ReplyComment from "@/views/userCenter/ReplyComment.vue";
import DemandCategory from "@/views/demands/DemandCategory.vue";
import NewWorkCategory from "@/views/works/NewWorkCategory.vue";
import HotWorkCategory from "@/views/works/HotWorkCategory.vue";
import UploadWork from "@/views/works/UploadWork.vue";
import AuthorPage from "@/views/userPage/AuthorPage.vue";
import PersonalDemands from "@/views/userPage/PersonalDemands.vue";
import HerWorks from "@/views/userPage/HerWorks.vue";
import WorkDetail from "@/views/works/WorkDetail.vue";

const routes = [
    {
        path: '/',
        name: 'home',
        component: () => import('@/views/Home.vue'),
        // 子路由
        children: [],
    },
    {
        path: '/login',
        name: 'login',
        component: () => import('@/views/login.vue'),
        // 子路由
    },
    {
        path:'/forgetPassword',
        name:'ForgetPassword',
        component:ForgetPassword
    },
    {
        path:'/personalCenter',
        name:'PersonalCenter',
        component:PersonalCenter
    },
    {
        path:'/personalPage',
        name:'PersonalPage',
        component:PersonalPage
    },
    {
        path:'/personalWorks',
        name:'PersonalWorks',
        component:PersonalWorks
    },
    {
      path: '/myMessage',
      name: 'MyMessage',
      component:MyMessage  
    },
    {
        path:'/personalSetting',
        name:'PersonalSetting',
        component:PersonalSetting
    },
    {
        path:'/changePassword',
        name:'ChangePassword',
        component:ChangePassword
    },
    {
        path:'/myLikes',
        name:'MyLikes',
        component:MyLikes
    },
    {
        path: '/demands',
        name:'Demands',
        component:Demands
    },
    {
        path:'/newWork',
        name:'NewWork',
        component:NewWork
    },
    {
        path:'/hotWork',
        name:'HotWork',
        component:HotWork
    },
    {
        path:'/demandsRelease',
        name:'DemandsRelease',
        component:DemandsRelease
    },
    {
        path:'/myDemands',
        name:'MyDemands',
        component:MyDemands
    },
    {
        path:'/demandDetails',
        name:'DemandDetails',
        component:DemandDetails
    },
    {
        path:'/demandUserPage',
        name:'DemandUserPage',
        component:DemandUserPage
    },
    {
        path:'/authors',
        name:'Authors',
        component:Authors
    },
    {
        path:'/searchPage',
        name:'SearchPage',
        component:SearchPage
    },
    {
        path:'/confirmOrder',
        name:'ConfirmOrder',
        component:ConfirmOrder
    },
    {
        path:'/myOrders',
        name:'MyOrders',
        component:MyOrders
    },
    {
        path:'/commentOrder',
        name:'CommentOrder',
        component:CommentOrder
    },
    {
        path:'/replyComment',
        name:'ReplyComment',
        component:ReplyComment
    },
    {
        path: '/demandCategory',
        name: 'DemandCategory',
        component: DemandCategory
    },
    {
        path:'/newWorkCategory',
        name: 'NewWorkCategory',
        component: NewWorkCategory
    },
    {
        path:'/hotWorkCategory',
        name: 'HotWorkCategory',
        component: HotWorkCategory
    },
    {
        path:'/uploadWork',
        name:'UploadWork',
        component:UploadWork
    },
    {
        path:'/authorPage',
        name:'AuthorPage',
        component:AuthorPage
    },
    {
        path:'/personalDemands',
        name:'PersonalDemands',
        component:PersonalDemands
    },
    {
        path:'/herWorks',
        name:'HerWorks',
        component:HerWorks
    },
    {
        path:'/workDetail',
        name:'WorkDetail',
        component:WorkDetail
    }

]

const router = new createRouter({
    history: createWebHashHistory(),
    routes
})

export default router
